home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Ebooks / Thinking in C++ V2 / C19 / ArraySize.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-25  |  400 b   |  16 lines

  1. //: C19:ArraySize.cpp
  2. // From Thinking in C++, 2nd Edition
  3. // Available at http://www.BruceEckel.com
  4. // (c) Bruce Eckel 1999
  5. // Copyright notice in Copyright.txt
  6. // The return value of the template function
  7. // asz() is a compile-time constant
  8. #include "../arraySize.h"
  9.  
  10. int main() {
  11.   int a[12], b[20];
  12.   const int sz1 = asz(a);
  13.   const int sz2 = asz(b);
  14.   int c[sz1], d[sz2];
  15. } ///:~
  16.